<h1>Vesti</h1>

<table cellspacing="0" class="list">
	<tr>
		<th>Id</th>
		<th>Naslov</th>
		<th>Datum</th>
		<th class="actions"><a href="#news/edit/" onclick="adminContent('{#root#}/admin_news/edit')">nova vest</a></th>
	</tr>
	{foreach from=$news item=n key=k name=newslist}
	<tr class="{if $smarty.foreach.newslist.index%2}even{else}odd{/if}">
		<td>{$n.id}</td>
		<td><a href="#news/edit/{$n.id}" onclick="adminContent('{#root#}/admin_news/edit/{$n.id}')">{$n.title}</a></td>
		<td>{$n.date|date_format:"%d.%b %Y"}</td>
		<td class="actions">
			<a href="#news/edit/{$n.id}" onclick="adminContent('{#root#}/admin_news/edit/{$n.id}')">izmeni</a>
			<a href="javascript:void(0)" onclick="if(confirm('Da li želite da obrišete vest?'))adminContent('{#root#}/admin_news/delete/{$n.id}')">obriši</a>
		</td>
	</tr>
	{/foreach}
</table>